import { Controller, Post, Body } from '@nestjs/common'
import { AuthService } from './auth.service'
import { CreateAuthDto } from './dto/create-auth.dto'
import { SkipDecorator } from 'src/common/decorator/skip-decorator.decorator'

@Controller('auth')
@SkipDecorator()
export class AuthController {
  constructor(private authService: AuthService) {}

  @Post('signin')
  signin(@Body() auth: any) {
    return this.authService.signin(auth.name, auth.password)
  }

  @Post('signup')
  signup(@Body() createUserDto: CreateAuthDto) {
    return this.authService.signup(createUserDto)
  }
}
